package cn.superchart.module.dev.tempparam.controller;
import cn.superchart.common.base.BaseController;
import cn.superchart.common.base.BaseResult;
import cn.superchart.module.dev.tempparam.entity.ScTempParam;
import cn.superchart.module.dev.tempparam.param.ScTempParamAddParam;
import cn.superchart.module.dev.tempparam.param.ScTempParamEditParam;
import cn.superchart.module.dev.tempparam.param.ScTempParamIdParam;
import cn.superchart.module.dev.tempparam.param.ScTempParamPageParam;
import cn.superchart.module.dev.tempparam.service.ScTempParamService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jakarta.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
 
 
@RestController
@Validated
public class ScTempParamController extends BaseController<ScTempParamService> {
 
    @GetMapping("/biz/licensetempparam/page")
    public BaseResult<Page<ScTempParam>> page(ScTempParamPageParam scTempParamPageParam) {
        return BaseResult.result(service.page(scTempParamPageParam));
    }

    @PostMapping("/biz/licensetempparam/add")
    public BaseResult<String> add(@RequestBody @Valid ScTempParamAddParam scTempParamAddParam) {
        service.add(scTempParamAddParam);
        return BaseResult.ok();
    }
    @PostMapping("/biz/licensetempparam/edit")
    public BaseResult<String> edit(@RequestBody @Valid ScTempParamEditParam scTempParamEditParam) {
        service.edit(scTempParamEditParam);
        return BaseResult.ok();
    }


    @GetMapping("/biz/licensetempparam/detail")
    public BaseResult<ScTempParam> detail(@Valid ScTempParamIdParam licenseTempParamIdParam) {
        return BaseResult.result(service.detail(licenseTempParamIdParam));
    }
}
